

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Interactive visualisation of atomic systems with qlab &mdash; quippy 7ea04c5+ documentation</title>
  

  
  
    <link rel="shortcut icon" href="_static/favicon.ico"/>
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script type="text/javascript" src="_static/language_data.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
        <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"processClass": "math|output_area", "processEscapes": true, "ignoreClass": "document", "inlineMath": [["$", "$"], ["\\(", "\\)"]]}})</script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="prev" title="Visualisation Tools" href="visualisation.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home"> quippy
          

          
            
            <img src="_static/hybrid.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                7ea04c5+
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
    
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction to <code class="docutils literal notranslate"><span class="pre">quippy</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation of QUIP and quippy</a></li>
<li class="toctree-l1"><a class="reference internal" href="Tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="quippy.html">Quippy library reference</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="visualisation.html">Visualisation Tools</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Interactive visualisation of atomic systems with <code class="docutils literal notranslate"><span class="pre">qlab</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="#viewing-atoms">Viewing Atoms</a></li>
<li class="toctree-l3"><a class="reference internal" href="#custom-atom-colouring">Custom Atom Colouring</a></li>
<li class="toctree-l3"><a class="reference internal" href="#viewing-trajectories">Viewing Trajectories</a></li>
<li class="toctree-l3"><a class="reference internal" href="#selecting-atoms">Selecting Atoms</a></li>
<li class="toctree-l3"><a class="reference internal" href="#multiple-viewers">Multiple Viewers</a><ul class="simple">
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="atomeye.html">AtomEye atomistic configuration viewer</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="fortran_wrapper.html">Appendix: wrapping Fortran 90 Code</a></li>
<li class="toctree-l1"><a class="reference internal" href="teach_sparse.html">Command line options of the teach_sparse main program</a></li>
</ul>

            
          
    <p></p>
    <ul>
        <li><a href="genindex.html">Index</a></li>
        <li><a href="py-modindex.html">Module Index</a></li>
        <li><a href="search.html">Search Page</a></li>
        <li><a href="_modules/index.html">Module Source Code</a></li>
    </ul>
  
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">quippy</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
          <li><a href="visualisation.html">Visualisation Tools</a> &raquo;</li>
        
      <li>Interactive visualisation of atomic systems with <code class="docutils literal notranslate"><span class="pre">qlab</span></code></li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/qlab.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  
<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast,
.nboutput.nblast {
    margin-bottom: 19px;  /* padding has already 5px */
}

/* ... except between code cells! */
.nblast + .nbinput {
    margin-top: -19px;
}

.admonition > p:before {
    margin-right: 4px;  /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
    text-align: unset;
}
</style>
<div class="section" id="module-qlab">
<span id="interactive-visualisation-of-atomic-systems-with-qlab"></span><h1>Interactive visualisation of atomic systems with <a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a><a class="headerlink" href="#module-qlab" title="Permalink to this headline">¶</a></h1>
<p>The <a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a> module provides a <a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.html#module-matplotlib.pyplot" title="(in Matplotlib v3.0.3)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pylab</span></code></a>-style
interface to <a class="reference internal" href="index.html#module-quippy" title="quippy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy</span></code></a> and <a class="reference internal" href="atomeye.html#module-atomeye" title="atomeye: AtomEye atomistic configuration viewer"><code class="xref py py-mod docutils literal notranslate"><span class="pre">atomeye</span></code></a>, and is designed for interactive use,
especially in conjunction with <a class="reference external" href="http://www.ipython.org">ipython</a>.</p>
<div class="section" id="viewing-atoms">
<h2>Viewing Atoms<a class="headerlink" href="#viewing-atoms" title="Permalink to this headline">¶</a></h2>
<p>The most important function defined in this module is <a class="reference internal" href="#qlab.view" title="qlab.view"><code class="xref py py-func docutils literal notranslate"><span class="pre">view()</span></code></a>, which is
used to open a new viewer or to update what is displayed in an existing viewer.
Here’s an example session to give some ideas of how <a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a> can be used:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">qlab</span> <span class="k">import</span> <span class="o">*</span>    <span class="c1"># Import all numpy, quippy and atomeye functions</span>

<span class="n">d</span> <span class="o">=</span> <span class="n">diamond</span><span class="p">(</span><span class="mf">5.44</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span> <span class="c1"># Make an 8-atom silicon unit cell</span>
<span class="n">view</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>               <span class="c1"># Pops up an AtomEye window to display our cell</span>
<span class="n">capture</span><span class="p">(</span><span class="s1">&#39;si8.png&#39;</span><span class="p">)</span>    <span class="c1"># Capture a screen shot to file &quot;si8.png&quot;</span>
</pre></div>
</div>
<img alt="si8.png" class="align-center" src="si8.png" />
<p>Once a viewer window is open, you can run all the methods of the
<a class="reference internal" href="atomeye.html#atomeye.AtomEyeViewer" title="atomeye.AtomEyeViewer"><code class="xref py py-class docutils literal notranslate"><span class="pre">atomeye.AtomEyeViewer</span></code></a> class as top-level functions in the
which affect the current viewer. This means that you can type, e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">aux_property_coloring</span><span class="p">(</span><span class="s2">&quot;z&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>to colour the Atoms being displayed in the current viewer by their
atomic number <code class="xref py py-attr docutils literal notranslate"><span class="pre">property</span></code>, or:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">change_bgcolor</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="n">resize</span><span class="p">(</span><span class="mi">640</span><span class="p">,</span><span class="mi">480</span><span class="p">)</span>
</pre></div>
</div>
<p>to change the background colour and size of the window. To redraw the
display, just repeat the <a class="reference internal" href="#qlab.view" title="qlab.view"><code class="xref py py-func docutils literal notranslate"><span class="pre">view()</span></code></a> command.</p>
</div>
<div class="section" id="custom-atom-colouring">
<span id="qlab-atom-coloring"></span><h2>Custom Atom Colouring<a class="headerlink" href="#custom-atom-colouring" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="atomeye.html#atomeye.AtomEyeViewer.aux_property_coloring" title="atomeye.AtomEyeViewer.aux_property_coloring"><code class="xref py py-meth docutils literal notranslate"><span class="pre">aux_property_coloring()</span></code></a> method is
overloaded to allow custom arrays to be visualised, e.g. to highlight
the atoms where <span class="math notranslate nohighlight">\(x \ge a/2\)</span>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">aux_property_coloring</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">pos</span><span class="p">[</span><span class="mi">1</span><span class="p">,:]</span> <span class="o">&gt;=</span> <span class="n">d</span><span class="o">.</span><span class="n">lattice</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">]</span><span class="o">/</span><span class="mf">2.</span><span class="p">)</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="_images/qlab-aux-property-colouring.png"><img alt="_images/qlab-aux-property-colouring.png" class="align-center" src="_images/qlab-aux-property-colouring.png" style="width: 400px;" /></a>
<p>You can quickly find individual atoms or groups of atoms by passing an
integer or list of integers to <a class="reference internal" href="#qlab.aux_property_coloring" title="qlab.aux_property_coloring"><code class="xref py py-func docutils literal notranslate"><span class="pre">aux_property_coloring()</span></code></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">aux_property_coloring</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="c1"># highlight first atom (counting from 1 by default)</span>
</pre></div>
</div>
<p>Note that these indices respect the global <code class="docutils literal notranslate"><span class="pre">fortran_indexing</span></code> setting
, i.e. they are zero-based if <code class="xref py py-func docutils literal notranslate"><span class="pre">get_fortran_indexing()</span></code>
returns True and one-based if it returns False.</p>
<p>To read off the properties of an individual atom, <cite>right click</cite> on it
in the AtomEye window. Again, the starting point for the indices
printed depends on <code class="docutils literal notranslate"><span class="pre">fortran_indexing</span></code>. The values used for colouring
the atom are in the <code class="docutils literal notranslate"><span class="pre">_show</span></code> property.</p>
<p>Here is a more advanced example showing how to draw arrows to visualise a vector
property (the forces on the atoms), and to colour the atoms by a component of the
stress tensor:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">d</span> <span class="o">=</span> <span class="n">diamond</span><span class="p">(</span><span class="mf">5.44</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span>      <span class="c1"># Make an 8-atom silicon unit cell</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">supercell</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>  <span class="c1"># Make a supercell of the Si bulk</span>
<span class="n">view</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>                    <span class="c1"># Visualise the system</span>
<span class="n">s</span><span class="o">.</span><span class="n">rattle</span><span class="p">(</span><span class="mf">0.01</span><span class="p">)</span>             <span class="c1"># Randomise the atomic positions a little</span>

<span class="n">p</span> <span class="o">=</span> <span class="n">Potential</span><span class="p">(</span><span class="s1">&#39;IP SW&#39;</span><span class="p">)</span>     <span class="c1"># Make a Stillinger-Weber potential calculator</span>
<span class="n">s</span><span class="o">.</span><span class="n">set_calculator</span><span class="p">(</span><span class="n">p</span><span class="p">)</span>        <span class="c1"># Associate it with our supercell</span>

<span class="n">f</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">get_forces</span><span class="p">()</span>
<span class="n">draw_arrows</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>  <span class="c1"># draw vectors on the atoms to represent forces</span>

<span class="n">sigma</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">get_stresses</span><span class="p">()</span>
<span class="n">aux_property_coloring</span><span class="p">(</span><span class="n">sigma</span><span class="p">[:,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>  <span class="c1"># colour atoms by sigma_yy</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="_images/qlab-force-stress.png"><img alt="_images/qlab-force-stress.png" class="align-center" src="_images/qlab-force-stress.png" style="width: 600px;" /></a>
</div>
<div class="section" id="viewing-trajectories">
<h2>Viewing Trajectories<a class="headerlink" href="#viewing-trajectories" title="Permalink to this headline">¶</a></h2>
<p>You can also pass a list of Atoms objects or a trajectory filename to
<a class="reference internal" href="#qlab.view" title="qlab.view"><code class="xref py py-func docutils literal notranslate"><span class="pre">view()</span></code></a> to visualise a sequence of frames. For example, here’s a
sequence of silicon unit cells with increasing lattice constant:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ds</span> <span class="o">=</span> <span class="p">[</span><span class="n">diamond</span><span class="p">(</span><span class="mf">5.44</span><span class="o">+</span><span class="mf">0.005</span><span class="o">*</span><span class="n">x</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)]</span>
<span class="n">view</span><span class="p">(</span><span class="n">ds</span><span class="p">)</span>
</pre></div>
</div>
<p>Use <cite>Insert</cite> and <cite>Delete</cite> to move through the frames, or <cite>Ctrl+Insert</cite>
and <cite>Ctrl+Delete</cite> to jump to the first/last frame. Note the frame
number is printed in the window title. There are also <a class="reference internal" href="#qlab.first" title="qlab.first"><code class="xref py py-func docutils literal notranslate"><span class="pre">first()</span></code></a>,
<a class="reference internal" href="#qlab.last" title="qlab.last"><code class="xref py py-func docutils literal notranslate"><span class="pre">last()</span></code></a>, <a class="reference internal" href="#qlab.forward" title="qlab.forward"><code class="xref py py-func docutils literal notranslate"><span class="pre">forward()</span></code></a>, and <a class="reference internal" href="#qlab.backward" title="qlab.backward"><code class="xref py py-func docutils literal notranslate"><span class="pre">backward()</span></code></a> functions.</p>
<p>There is also a command line script <cite>quippy</cite> which starts an <cite>ipython</cite> shell
and imports everything from <a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a> automatically, and opens
viewers for any file given on the command line, e.g. from the shell</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ quippy traj.nc
</pre></div>
</div>
<p>will fire up <cite>ipython</cite>, load everything from
<a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a> and then open a viewer for the file <code class="docutils literal notranslate"><span class="pre">traj.nc</span></code>.</p>
<p>When working with large trajectory files, the <a class="reference internal" href="#qlab.clip_visible" title="qlab.clip_visible"><code class="xref py py-func docutils literal notranslate"><span class="pre">clip_visible()</span></code></a>
function is useful to restrict the number of atoms loaded from disk
and displayed, which can make visualising big systems much more
managable.</p>
<p>There is a <a class="reference internal" href="#qlab.gcv" title="qlab.gcv"><code class="xref py py-func docutils literal notranslate"><span class="pre">gcv()</span></code></a> function to get a reference to the current
viewer (short for”get current viewer”, in analogy with
<a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.gcf.html#matplotlib.pyplot.gcf" title="(in Matplotlib v3.0.3)"><code class="xref py py-func docutils literal notranslate"><span class="pre">gcf()</span></code></a> and <a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.gca.html#matplotlib.pyplot.gca" title="(in Matplotlib v3.0.3)"><code class="xref py py-func docutils literal notranslate"><span class="pre">gca()</span></code></a>
in <a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.pyplot.html#module-matplotlib.pyplot" title="(in Matplotlib v3.0.3)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pylab</span></code></a>), and a similarily named <a class="reference internal" href="#qlab.gcat" title="qlab.gcat"><code class="xref py py-func docutils literal notranslate"><span class="pre">gcat()</span></code></a>
(“get current atoms”) to get a reference to the current Atoms being viewed.
For a trajectory with multiple frames, this corresponds to the current frame.</p>
<p>You can set the current frame to 10 directly with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">set_frame</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
</pre></div>
</div>
<p>Or specify that the frame should advance by 5 steps each time <cite>Insert</cite>
is pressed with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">set_delta</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
</pre></div>
</div>
<p>If you would like to make a movie of your simulation, you can use
the <a class="reference internal" href="#qlab.render_movie" title="qlab.render_movie"><code class="xref py py-func docutils literal notranslate"><span class="pre">render_movie()</span></code></a> function:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">render_movie</span><span class="p">(</span><span class="s1">&#39;movie.mp4&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>This function renders each frame to a <code class="docutils literal notranslate"><span class="pre">.jpg</span></code> file, before combining the
snapshots with the <a class="reference external" href="http://www.ffmpeg.org/">ffmpeg</a> tool (which needs to
be installed for this to work). There is a <cite>hook</cite> function which is called at
each frame to allow change to be made to the Atoms object. For example, to run
a 1 ps MD and render the movie of every 10th frame:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">d</span> <span class="o">=</span> <span class="n">diamond</span><span class="p">(</span><span class="mf">5.44</span><span class="p">,</span> <span class="mi">14</span><span class="p">)</span>           <span class="c1"># Usual 8-atom cell</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">supercell</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>       <span class="c1"># Make a supercell</span>
<span class="n">p</span> <span class="o">=</span> <span class="n">Potential</span><span class="p">(</span><span class="s1">&#39;IP SW&#39;</span><span class="p">)</span>          <span class="c1"># Make a Stillinger-Weber potential</span>
<span class="n">s</span><span class="o">.</span><span class="n">set_cutoff</span><span class="p">(</span><span class="n">p</span><span class="o">.</span><span class="n">cutoff</span><span class="p">()</span><span class="o">+</span><span class="mf">1.</span><span class="p">)</span>     <span class="c1"># Neighbour cutoff for atoms is pot cutoff + 1 A</span>

<span class="n">ds</span> <span class="o">=</span> <span class="n">DynamicalSystem</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>         <span class="c1"># Construct a DynamicalSystem from our Atoms</span>
<span class="n">ds</span><span class="o">.</span><span class="n">rescale_velo</span><span class="p">(</span><span class="mf">1000.</span><span class="p">)</span>          <span class="c1"># Set the initial temperature to 1000 K</span>
<span class="n">traj</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="mi">1000</span><span class="p">,</span> <span class="n">save_interval</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span> <span class="c1"># Run 1 ps of dynamics</span>

<span class="n">view</span><span class="p">(</span><span class="n">traj</span><span class="p">)</span>                      <span class="c1"># Visualise the trajectory: 100 frames long</span>
<span class="n">aux_property_coloring</span><span class="p">(</span><span class="s1">&#39;avg_ke&#39;</span><span class="p">)</span> <span class="c1"># Colour atoms by their time-averaged kinetic energy</span>
<span class="n">toggle_aux_property_thresholds_ridid</span><span class="p">()</span> <span class="c1"># Fix the colour scale during movie</span>
<span class="n">toggle_aux_property_thresholds_saturation</span><span class="p">()</span> <span class="c1"># Don&#39;t make any atoms invisible</span>
<span class="n">render_movie</span><span class="p">(</span><span class="s1">&#39;traj.mp4&#39;</span><span class="p">)</span>        <span class="c1"># Make the movie</span>
</pre></div>
</div>
<p>The movie generated by this script looks like this:</p>
<center>
<video width="640" height="320" controls="controls" poster="http://www.jrkermode.co.uk/_movies/traj-poster.jpg">
  <source src="http://www.jrkermode.co.uk/_movies/traj.mp4"  type='video/mp4' />
  <source src="http://www.jrkermode.co.uk/_movies/traj.ogv"  type='video/ogg; codecs="theora, vorbis"'' />
  <source src="http://www.jrkermode.co.uk/_movies/traj.webm" type='video/webm; codecs="vp8.0, vorbis"' />
  <p><b>Your browser does not support HTML5 video.
  <a href="http://www.jrkermode.co.uk/_movies/traj.mp4">Download</a> the video instead.
  </b></p>
</video>
</center></div>
<div class="section" id="selecting-atoms">
<span id="qlab-select-atoms"></span><h2>Selecting Atoms<a class="headerlink" href="#selecting-atoms" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="#qlab.select_atoms" title="qlab.select_atoms"><code class="xref py py-func docutils literal notranslate"><span class="pre">select_atoms()</span></code></a> function is useful for graphically selecting a
group of atoms, e.g. to manually define an initial QM region for a
<a class="reference internal" href="Tutorials/adaptive-qmmm.html#qmmm-tutorial"><span class="std std-ref">QM/MM calculation</span></a>. After invoking the function, right
clicking on atoms you want to select. They will be highlighted in red. When you
are done, press <cite>Enter</cite>. Here’s an example <cite>ipython</cite> session:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">In</span> <span class="p">[</span><span class="mi">9</span><span class="p">]:</span> <span class="n">view</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
<span class="n">Reusing</span> <span class="n">viewer</span> <span class="n">named</span> <span class="n">at</span>
<span class="n">Out</span><span class="p">[</span><span class="mi">9</span><span class="p">]:</span> <span class="o">&lt;</span><span class="n">AtomsViewer</span> <span class="nb">object</span> <span class="n">at</span> <span class="mh">0x10b9f19d0</span> <span class="n">fpointer</span><span class="o">=</span><span class="p">(</span><span class="o">-</span><span class="mi">33474560</span><span class="p">,</span> <span class="mi">32762</span><span class="p">)</span><span class="o">&gt;</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">10</span><span class="p">]:</span> <span class="n">atoms_list</span> <span class="o">=</span> <span class="n">select_atoms</span><span class="p">()</span>
<span class="n">Right</span> <span class="n">click</span> <span class="n">to</span> <span class="n">select</span> <span class="n">atoms</span><span class="o">.</span> <span class="n">Press</span> <span class="n">ENTER</span> <span class="n">to</span> <span class="n">finish</span><span class="o">.</span>
<span class="n">indices</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">224</span> <span class="mi">265</span> <span class="mi">261</span>
 <span class="p">]</span>
</pre></div>
</div>
<p>If you want to add to the selection, run <a class="reference internal" href="#qlab.select_atoms" title="qlab.select_atoms"><code class="xref py py-func docutils literal notranslate"><span class="pre">select_atoms()</span></code></a> again with
the <cite>reset</cite> argument set to False. To customise the value applied to atoms
which are clicked on, use the <cite>value</cite> argument: e.g. to de-select atoms
clicked on by mistake, you could do:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">select_atoms</span><span class="p">(</span><span class="n">reset</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
<p>By default the selection is saved as a logical property named <code class="docutils literal notranslate"><span class="pre">selection_mask</span></code>.
This name can be changed with the <cite>markname</cite> argument, e.g. to set the <cite>hybrid</cite>
property, you could could use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">qm_list</span> <span class="o">=</span> <span class="n">select_atoms</span><span class="p">(</span><span class="n">markname</span><span class="o">=</span><span class="s1">&#39;hybrid&#39;</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="n">HYBRID_ACTIVE_MARK</span><span class="p">,</span> <span class="n">reset</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="multiple-viewers">
<h2>Multiple Viewers<a class="headerlink" href="#multiple-viewers" title="Permalink to this headline">¶</a></h2>
<p>By default a single viewer window is reused for individual Atoms
objects, while a new window is opened for each different trajectory
filename. You can override this with the <cite>recycle</cite> argument to
<a class="reference internal" href="#qlab.view" title="qlab.view"><code class="xref py py-func docutils literal notranslate"><span class="pre">view()</span></code></a>, e.g. to open a second window for a copy of <cite>d</cite>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">d2</span> <span class="o">=</span> <span class="n">d</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="n">view</span><span class="p">(</span><span class="n">d2</span><span class="p">,</span> <span class="n">recycle</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
<p>You can close a viewer by pressing <cite>q</cite> when it has the mouse focus.
Each viewer has a <code class="xref py py-attr docutils literal notranslate"><span class="pre">name</span></code> attribute which can be
use to get a reference to it with the <a class="reference internal" href="#qlab.get_viewer" title="qlab.get_viewer"><code class="xref py py-func docutils literal notranslate"><span class="pre">get_viewer()</span></code></a> function.</p>
<p>For trajectories read from files, the names are derived from the
filename. The default viewer for <code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code> objects is named <cite>at</cite>
and for the default viewers for <code class="xref py py-class docutils literal notranslate"><span class="pre">AtomsList</span></code> and <code class="xref py py-class docutils literal notranslate"><span class="pre">AtomsReader</span></code>
objects is called <cite>al</cite>. <a class="reference internal" href="#qlab.get_viewer_names" title="qlab.get_viewer_names"><code class="xref py py-func docutils literal notranslate"><span class="pre">get_viewer_names()</span></code></a> returns a list of the names af
all the viewers currently open.</p>
<p>Usually referring to the current viewer with <a class="reference internal" href="#qlab.gcv" title="qlab.gcv"><code class="xref py py-func docutils literal notranslate"><span class="pre">gcv()</span></code></a> is sufficient,
but you may want to change the default focus for console commands with
<a class="reference internal" href="#qlab.scv" title="qlab.scv"><code class="xref py py-func docutils literal notranslate"><span class="pre">scv()</span></code></a>, e.g. to set the current viewer to the one visualising the
file <code class="docutils literal notranslate"><span class="pre">traj.nc</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">scv</span><span class="p">(</span><span class="n">get_viewer</span><span class="p">(</span><span class="s1">&#39;traj&#39;</span><span class="p">))</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p><a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a> combines all the <a class="reference external" href="https://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.16)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy</span></code></a>, <a class="reference internal" href="index.html#module-quippy" title="quippy"><code class="xref py py-mod docutils literal notranslate"><span class="pre">quippy</span></code></a> and <a class="reference internal" href="atomeye.html#module-atomeye" title="atomeye: AtomEye atomistic configuration viewer"><code class="xref py py-mod docutils literal notranslate"><span class="pre">atomeye</span></code></a> functions
into a single namespace, so <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">qlab</span> <span class="pre">import</span> <span class="pre">*</span></code> is roughly equivalent to:</p>
<div class="last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">numpy</span> <span class="k">import</span> <span class="o">*</span>
<span class="kn">import</span> <span class="nn">quippy</span>
<span class="kn">from</span> <span class="nn">quippy</span> <span class="k">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">atomeye</span> <span class="k">import</span> <span class="o">*</span>
</pre></div>
</div>
</div>
<p>Module contents for <a class="reference internal" href="#module-qlab" title="qlab: Interactive visualisation of atomic systems"><code class="xref py py-mod docutils literal notranslate"><span class="pre">qlab</span></code></a>:</p>
<p class="rubric">Classes</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#qlab.QuippyViewer" title="qlab.QuippyViewer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">QuippyViewer</span></code></a>(name[,&nbsp;verbose])</td>
<td>quippy-specific extensions to AtomEyeViewer</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.AtomsViewer" title="qlab.AtomsViewer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AtomsViewer</span></code></a>([source,&nbsp;name,&nbsp;verbose])</td>
<td>Subclass of Atoms and AtomEyeViewer</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.AtomsListViewer" title="qlab.AtomsListViewer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AtomsListViewer</span></code></a>([source,&nbsp;name,&nbsp;rename])</td>
<td>Subclass of AtomsList and AtomEyeViewer</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.AtomsReaderViewer" title="qlab.AtomsReaderViewer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">AtomsReaderViewer</span></code></a>([source,&nbsp;name,&nbsp;cache,&nbsp;…])</td>
<td>Subclass of AtomsReader and AtomEyeViewer</td>
</tr>
</tbody>
</table>
<p class="rubric">Functions</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#qlab.view" title="qlab.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view</span></code></a>(source[,&nbsp;name,&nbsp;recycle,&nbsp;loadall,&nbsp;…])</td>
<td>Read atoms from <cite>source</cite> and open in an AtomEye viewer window.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.gcv" title="qlab.gcv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gcv</span></code></a>()</td>
<td>Return the current (most recently created or used) AtomEye viewer instance</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.gcat" title="qlab.gcat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">gcat</span></code></a>()</td>
<td>Return the current Atoms object being visualised by the current viewer</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.scv" title="qlab.scv"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scv</span></code></a>(viewer)</td>
<td>Set the current AtomEye viewer to <cite>viewer</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.get_viewer_names" title="qlab.get_viewer_names"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_viewer_names</span></code></a>()</td>
<td>Return the current list of viewer names</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.get_viewers" title="qlab.get_viewers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_viewers</span></code></a>()</td>
<td>Return the current list of viewers</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.highlight_qm_region" title="qlab.highlight_qm_region"><code class="xref py py-obj docutils literal notranslate"><span class="pre">highlight_qm_region</span></code></a>([at,&nbsp;run_suffix])</td>
<td>Highlight QM region by replacing Si atoms with Al, and O atoms with N, and changing colour of QM atoms to dark blue.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.redraw" title="qlab.redraw"><code class="xref py py-obj docutils literal notranslate"><span class="pre">redraw</span></code></a>()</td>
<td>Redraw current AtomEye window, keeping Atoms and settings the same.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.run_command" title="qlab.run_command"><code class="xref py py-obj docutils literal notranslate"><span class="pre">run_command</span></code></a>(command)</td>
<td>Run a command in current AtomEye thread.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.run_script" title="qlab.run_script"><code class="xref py py-obj docutils literal notranslate"><span class="pre">run_script</span></code></a>(script)</td>
<td>Run commands from the file script, in a blocking fashion.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.close" title="qlab.close"><code class="xref py py-obj docutils literal notranslate"><span class="pre">close</span></code></a>()</td>
<td>Close the current viewer window.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.setp" title="qlab.setp"><code class="xref py py-obj docutils literal notranslate"><span class="pre">setp</span></code></a>(self,&nbsp;key,&nbsp;value)</td>
<td>Run the AtomEye command “set key value”</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.save_script" title="qlab.save_script"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_script</span></code></a>(filename)</td>
<td>Save AtomEye viewer settings to a file.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.toggle_coordination_coloring" title="qlab.toggle_coordination_coloring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_coordination_coloring</span></code></a>()</td>
<td>Turn on or off colouring by coordination number (key “k”)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.translate" title="qlab.translate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">translate</span></code></a>(axis,&nbsp;delta)</td>
<td>Translate system along <cite>axis</cite> by an amount <cite>delta</cite> (key “Ctrl+left/right/up/down”)</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.shift_xtal" title="qlab.shift_xtal"><code class="xref py py-obj docutils literal notranslate"><span class="pre">shift_xtal</span></code></a>(axis,&nbsp;delta)</td>
<td>Shift crystal within periodic boundaries along <cite>axis</cite> by <cite>delta</cite> (key “Shift+left/right/up/down”).</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.rotate" title="qlab.rotate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rotate</span></code></a>(axis,&nbsp;theta)</td>
<td>Rotate around <cite>axis</cite> by angle <cite>theta</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.advance" title="qlab.advance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">advance</span></code></a>(delta)</td>
<td>Move the camera forward by <cite>delta</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.shift_cutting_plane" title="qlab.shift_cutting_plane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">shift_cutting_plane</span></code></a>(delta)</td>
<td>Shift the current cutting plane by an amount <cite>delta</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.change_bgcolor" title="qlab.change_bgcolor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_bgcolor</span></code></a>(color)</td>
<td>Change the viewer background colour to <cite>color</cite>, which should be a RGB tuple with three floats in range 0..1.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.change_atom_r_ratio" title="qlab.change_atom_r_ratio"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_atom_r_ratio</span></code></a>(delta)</td>
<td>Change the size of the balls used to draw the atoms by <cite>delta</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.change_bond_radius" title="qlab.change_bond_radius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_bond_radius</span></code></a>(delta)</td>
<td>Change the radius of the cylinders used the draw bonds by <cite>delta</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.change_view_angle_amplification" title="qlab.change_view_angle_amplification"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_view_angle_amplification</span></code></a>(delta)</td>
<td>Change the amplification of the view angle by <cite>delta</cite>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.toggle_parallel_projection" title="qlab.toggle_parallel_projection"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_parallel_projection</span></code></a>()</td>
<td>Toggle between parallel and perspective projections.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.toggle_bond_mode" title="qlab.toggle_bond_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_bond_mode</span></code></a>()</td>
<td>Turn on or off bonds.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.toggle_small_cell_mode" title="qlab.toggle_small_cell_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_small_cell_mode</span></code></a>()</td>
<td>Toggle between two different behaviours for when cell is smaller than r_cut/2:</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.normal_coloring" title="qlab.normal_coloring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">normal_coloring</span></code></a>()</td>
<td>Return to normal colouring of the atoms (key “o”).</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.aux_property_coloring" title="qlab.aux_property_coloring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">aux_property_coloring</span></code></a>(auxprop)</td>
<td>Colour the currently viewed atoms according to <cite>auxprop</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.central_symmetry_coloring" title="qlab.central_symmetry_coloring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">central_symmetry_coloring</span></code></a>()</td>
<td>Colour atoms by centro-symmetry parameter.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.change_aux_property_threshold" title="qlab.change_aux_property_threshold"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_aux_property_threshold</span></code></a>(lower,&nbsp;upper)</td>
<td>Change the lower and upper aux property thresholds.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.reset_aux_property_thresholds" title="qlab.reset_aux_property_thresholds"><code class="xref py py-obj docutils literal notranslate"><span class="pre">reset_aux_property_thresholds</span></code></a>()</td>
<td>Reset aux property thresholds to automatic values.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.toggle_aux_property_thresholds_saturation" title="qlab.toggle_aux_property_thresholds_saturation"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_aux_property_thresholds_saturation</span></code></a>()</td>
<td>Toggle between saturated colouring and invisibility for values outside aux prop thresholds.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.toggle_aux_property_thresholds_rigid" title="qlab.toggle_aux_property_thresholds_rigid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">toggle_aux_property_thresholds_rigid</span></code></a>()</td>
<td>Toggle between floating and rigid aux property thresholds when moving between frames</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.rcut_patch" title="qlab.rcut_patch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">rcut_patch</span></code></a>(sym1,&nbsp;sym2,&nbsp;value[,&nbsp;absolute])</td>
<td>Change the cutoff distance for <cite>sym1</cite>–<cite>sym2</cite> bonds by <cite>delta</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.select_gear" title="qlab.select_gear"><code class="xref py py-obj docutils literal notranslate"><span class="pre">select_gear</span></code></a>(gear)</td>
<td>Change the AtomEye gear to <cite>gear</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.cutting_plane" title="qlab.cutting_plane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cutting_plane</span></code></a>(n,&nbsp;d,&nbsp;s)</td>
<td>Create a new cutting plane with index <cite>n</cite>, normal <cite>d</cite>, and fractional displacement <cite>s</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.shift_cutting_plane_to_anchor" title="qlab.shift_cutting_plane_to_anchor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">shift_cutting_plane_to_anchor</span></code></a>(n)</td>
<td>Move the cutting plane with index <cite>n</cite> to the anchor</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.delete_cutting_plane" title="qlab.delete_cutting_plane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">delete_cutting_plane</span></code></a>(n)</td>
<td>Delete the cutting plane with index <cite>n</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.flip_cutting_plane" title="qlab.flip_cutting_plane"><code class="xref py py-obj docutils literal notranslate"><span class="pre">flip_cutting_plane</span></code></a>(n)</td>
<td>Flip the cutting plane with index <cite>n</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.capture" title="qlab.capture"><code class="xref py py-obj docutils literal notranslate"><span class="pre">capture</span></code></a>(filename[,&nbsp;resolution])</td>
<td>Render the current view to image <cite>filename</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.change_wireframe_mode" title="qlab.change_wireframe_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_wireframe_mode</span></code></a>()</td>
<td>Change the display mode for the unit cell box.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.change_cutting_plane_wireframe_mode" title="qlab.change_cutting_plane_wireframe_mode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_cutting_plane_wireframe_mode</span></code></a>()</td>
<td>Change the display mode for cutting planes</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.get_frame" title="qlab.get_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_frame</span></code></a>()</td>
<td>Get index of frame currently being viewed</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.set_frame" title="qlab.set_frame"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_frame</span></code></a>(frame)</td>
<td>Set current frame index to <cite>frame</cite></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.get_delta" title="qlab.get_delta"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_delta</span></code></a>()</td>
<td>Get frame increment rate</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.set_delta" title="qlab.set_delta"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_delta</span></code></a>(delta)</td>
<td>Set frame increment rate</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.first" title="qlab.first"><code class="xref py py-obj docutils literal notranslate"><span class="pre">first</span></code></a>()</td>
<td>Show the first frame (frame 0).</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.last" title="qlab.last"><code class="xref py py-obj docutils literal notranslate"><span class="pre">last</span></code></a>()</td>
<td>Show the last frame, i.e.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.forward" title="qlab.forward"><code class="xref py py-obj docutils literal notranslate"><span class="pre">forward</span></code></a>([delta])</td>
<td>Move forward by <cite>delta</cite> frames (default value is gcv().delta).</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.backward" title="qlab.backward"><code class="xref py py-obj docutils literal notranslate"><span class="pre">backward</span></code></a>([delta])</td>
<td>Move backward by <cite>delta</cite> frames (default values is gcv().delta).</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.load_atom_color" title="qlab.load_atom_color"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_atom_color</span></code></a>(filename)</td>
<td>Load atom colours from a .clr file.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.load_aux" title="qlab.load_aux"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_aux</span></code></a>(filename)</td>
<td>Load aux property values from a .aux file.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.look_at_the_anchor" title="qlab.look_at_the_anchor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">look_at_the_anchor</span></code></a>()</td>
<td>Equivalent to pressing the <cite>a</cite> key</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.observer_goto" title="qlab.observer_goto"><code class="xref py py-obj docutils literal notranslate"><span class="pre">observer_goto</span></code></a>()</td>
<td>Prompt for fractional position and move the observer there</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.xtal_origin_goto" title="qlab.xtal_origin_goto"><code class="xref py py-obj docutils literal notranslate"><span class="pre">xtal_origin_goto</span></code></a>(s)</td>
<td>Move the crystal origin to fractional coordinates <cite>s</cite></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.find_atom" title="qlab.find_atom"><code class="xref py py-obj docutils literal notranslate"><span class="pre">find_atom</span></code></a>(i)</td>
<td>Set the anchor to the atom with index <cite>i</cite>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.resize" title="qlab.resize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">resize</span></code></a>(width,&nbsp;height)</td>
<td>Resize the current window to <cite>width</cite> x <cite>height</cite> pixels.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.change_aux_colormap" title="qlab.change_aux_colormap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">change_aux_colormap</span></code></a>(n)</td>
<td>Select the <cite>n</cite>-th auxiliary property colourmap.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.draw_arrows" title="qlab.draw_arrows"><code class="xref py py-obj docutils literal notranslate"><span class="pre">draw_arrows</span></code></a>(property[,&nbsp;scale_factor,&nbsp;…])</td>
<td>Draw arrows on each atom, based on a vector property</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.wait" title="qlab.wait"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wait</span></code></a>()</td>
<td>Sleep until current AtomEye viewer has finished processing all queued events.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.get_visible" title="qlab.get_visible"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_visible</span></code></a>()</td>
<td>Return list of indices of atoms currently visible in the current viewer.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.clip_visible" title="qlab.clip_visible"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip_visible</span></code></a>([orig_index])</td>
<td>Remove atoms outside the visible window from the Atoms object.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.select_atoms" title="qlab.select_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">select_atoms</span></code></a>([reset,&nbsp;markname,&nbsp;value])</td>
<td>Select atoms by clicking on them.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.render_movie" title="qlab.render_movie"><code class="xref py py-obj docutils literal notranslate"><span class="pre">render_movie</span></code></a>(moviefile[,&nbsp;start,&nbsp;stop,&nbsp;step,&nbsp;…])</td>
<td>Render a movie for the trajectory.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.set_cutoffs" title="qlab.set_cutoffs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_cutoffs</span></code></a>([nneighb_only])</td>
<td>Set cutoffs for AtomEye bonds and coordination colouring</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="qlab.AtomsListViewer">
<em class="property">class </em><code class="descclassname">qlab.</code><code class="descname">AtomsListViewer</code><span class="sig-paren">(</span><em>source=None</em>, <em>name=None</em>, <em>rename=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsListViewer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsListViewer" title="Permalink to this definition">¶</a></dt>
<dd><p>Subclass of AtomsList and AtomEyeViewer</p>
</dd></dl>

<dl class="class">
<dt id="qlab.AtomsReaderViewer">
<em class="property">class </em><code class="descclassname">qlab.</code><code class="descname">AtomsReaderViewer</code><span class="sig-paren">(</span><em>source=None</em>, <em>name=None</em>, <em>cache=True</em>, <em>verbose=True</em>, <em>rename=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsReaderViewer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsReaderViewer" title="Permalink to this definition">¶</a></dt>
<dd><p>Subclass of AtomsReader and AtomEyeViewer</p>
</dd></dl>

<dl class="class">
<dt id="qlab.AtomsViewer">
<em class="property">class </em><code class="descclassname">qlab.</code><code class="descname">AtomsViewer</code><span class="sig-paren">(</span><em>source=None</em>, <em>name=None</em>, <em>verbose=True</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsViewer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsViewer" title="Permalink to this definition">¶</a></dt>
<dd><p>Subclass of Atoms and AtomEyeViewer</p>
<dl class="method">
<dt id="qlab.AtomsViewer.copy">
<code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsViewer.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsViewer.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of this <code class="xref py py-class docutils literal notranslate"><span class="pre">Atoms</span></code> object</p>
</dd></dl>

<dl class="method">
<dt id="qlab.AtomsViewer.gcat">
<code class="descname">gcat</code><span class="sig-paren">(</span><em>update=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsViewer.gcat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsViewer.gcat" title="Permalink to this definition">¶</a></dt>
<dd><p>Get current atoms - return Atoms object currently being visualised.</p>
<p>If update=False (the default), we return what is currently being visualised,
even if this is not in sync with self.atoms[self.frame].</p>
</dd></dl>

<dl class="method">
<dt id="qlab.AtomsViewer.scat">
<code class="descname">scat</code><span class="sig-paren">(</span><em>atoms</em>, <em>frame=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#AtomsViewer.scat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.AtomsViewer.scat" title="Permalink to this definition">¶</a></dt>
<dd><p>Set current atoms (and optionally also current frame)</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="qlab.QuippyViewer">
<em class="property">class </em><code class="descclassname">qlab.</code><code class="descname">QuippyViewer</code><span class="sig-paren">(</span><em>name</em>, <em>verbose=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer" title="Permalink to this definition">¶</a></dt>
<dd><p>quippy-specific extensions to AtomEyeViewer</p>
<p class="rubric">Methods</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#qlab.QuippyViewer.clip_visible" title="qlab.QuippyViewer.clip_visible"><code class="xref py py-obj docutils literal notranslate"><span class="pre">clip_visible</span></code></a>([orig_index])</td>
<td>Remove atoms outside the visible window from the Atoms object.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.QuippyViewer.render_movie" title="qlab.QuippyViewer.render_movie"><code class="xref py py-obj docutils literal notranslate"><span class="pre">render_movie</span></code></a>(moviefile[,&nbsp;start,&nbsp;stop,&nbsp;step,&nbsp;…])</td>
<td>Render a movie for the trajectory.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#qlab.QuippyViewer.select_atoms" title="qlab.QuippyViewer.select_atoms"><code class="xref py py-obj docutils literal notranslate"><span class="pre">select_atoms</span></code></a>([reset,&nbsp;markname,&nbsp;value])</td>
<td>Select atoms by clicking on them.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#qlab.QuippyViewer.set_cutoffs" title="qlab.QuippyViewer.set_cutoffs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_cutoffs</span></code></a>([nneighb_only])</td>
<td>Set cutoffs for AtomEye bonds and coordination colouring</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="qlab.QuippyViewer.clip_visible">
<code class="descname">clip_visible</code><span class="sig-paren">(</span><em>orig_index=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer.clip_visible"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer.clip_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove atoms outside the visible window from the Atoms object. Also sets indices for frames not yet loaded from disk.</p>
</dd></dl>

<dl class="method">
<dt id="qlab.QuippyViewer.render_movie">
<code class="descname">render_movie</code><span class="sig-paren">(</span><em>moviefile</em>, <em>start=None</em>, <em>stop=None</em>, <em>step=None</em>, <em>hook=None</em>, <em>offset=0</em>, <em>encoder='ffmpeg -i %s -r 25 -b 30M %s'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer.render_movie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer.render_movie" title="Permalink to this definition">¶</a></dt>
<dd><p>Render a movie for the trajectory.</p>
</dd></dl>

<dl class="method">
<dt id="qlab.QuippyViewer.select_atoms">
<code class="descname">select_atoms</code><span class="sig-paren">(</span><em>reset=True</em>, <em>markname='selection_mark'</em>, <em>value=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer.select_atoms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer.select_atoms" title="Permalink to this definition">¶</a></dt>
<dd><p>Select atoms by clicking on them. Returns a list of atom indices.</p>
<p>Specify reset=False to modify an existing property. The name of the
property is <cite>markname</cite> (default “selection_mark”) and the value of
clicked atoms is given by the <cite>value</cite> argument (default True).</p>
</dd></dl>

<dl class="method">
<dt id="qlab.QuippyViewer.set_cutoffs">
<code class="descname">set_cutoffs</code><span class="sig-paren">(</span><em>nneighb_only=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer.set_cutoffs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer.set_cutoffs" title="Permalink to this definition">¶</a></dt>
<dd><p>Set cutoffs for AtomEye bonds and coordination colouring</p>
<p>Cutoff lengths are set to match quippy <code class="xref py py-attr docutils literal notranslate"><span class="pre">nneightol</span></code>
(if <cite>nneighb_only</cite> is True, the default) or <code class="xref py py-attr docutils literal notranslate"><span class="pre">cutoff</span></code>
(otherwise).</p>
</dd></dl>

<dl class="method">
<dt id="qlab.QuippyViewer.show">
<code class="descname">show</code><span class="sig-paren">(</span><em>property=None</em>, <em>frame=None</em>, <em>arrows=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#QuippyViewer.show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.QuippyViewer.show" title="Permalink to this definition">¶</a></dt>
<dd><p>Update what is shown in this AtomEye viewer window.</p>
<p><cite>property</cite> should be the name of the auxiliary property used to colour the atoms (e.g. “charge”)
<cite>frame</cite> is the (zero-based) index of the frame to show.
<cite>arrows</cite> is the name of a vector property to use to draw arrows on the atoms (e.g. “force”)</p>
<p>When called with no arguments, show() is equivalent to redraw().</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="qlab.advance">
<code class="descclassname">qlab.</code><code class="descname">advance</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#advance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.advance" title="Permalink to this definition">¶</a></dt>
<dd><p>Move the camera forward by <cite>delta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.aux_property_coloring">
<code class="descclassname">qlab.</code><code class="descname">aux_property_coloring</code><span class="sig-paren">(</span><em>auxprop</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#aux_property_coloring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.aux_property_coloring" title="Permalink to this definition">¶</a></dt>
<dd><p>Colour the currently viewed atoms according to <cite>auxprop</cite>.</p>
<p>Overloaded to allow 
See <a class="reference internal" href="#qlab-atom-coloring"><span class="std std-ref">Custom Atom Colouring</span></a> for more details and examples.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>auxprop</strong> <span class="classifier-delimiter">:</span> <span class="classifier">str, array_like, int or list</span></dt>
<dd><p class="first last">Values to use to colour the atoms. Should be either the
name of a scalar field entry in <a class="reference internal" href="atoms.html#quippy.atoms.Atoms.properties" title="quippy.atoms.Atoms.properties"><code class="xref py py-attr docutils literal notranslate"><span class="pre">properties</span></code></a>
(or equivalently, <code class="xref py py-attr docutils literal notranslate"><span class="pre">arrays</span></code>) such as <code class="docutils literal notranslate"><span class="pre">&quot;charge&quot;</span></code>,
a float, int or bool array of shape <code class="docutils literal notranslate"><span class="pre">(len(gcat()),)</span></code>, or an
atom index or list of atom indices to highlight particular atoms.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="qlab.backward">
<code class="descclassname">qlab.</code><code class="descname">backward</code><span class="sig-paren">(</span><em>delta=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#backward"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.backward" title="Permalink to this definition">¶</a></dt>
<dd><p>Move backward by <cite>delta</cite> frames (default values is gcv().delta).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.capture">
<code class="descclassname">qlab.</code><code class="descname">capture</code><span class="sig-paren">(</span><em>filename</em>, <em>resolution=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#capture"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.capture" title="Permalink to this definition">¶</a></dt>
<dd><p>Render the current view to image <cite>filename</cite></p>
<p>Format is determined from file extension: .png, .jpeg, or .eps.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.central_symmetry_coloring">
<code class="descclassname">qlab.</code><code class="descname">central_symmetry_coloring</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#central_symmetry_coloring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.central_symmetry_coloring" title="Permalink to this definition">¶</a></dt>
<dd><p>Colour atoms by centro-symmetry parameter.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_atom_r_ratio">
<code class="descclassname">qlab.</code><code class="descname">change_atom_r_ratio</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_atom_r_ratio"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_atom_r_ratio" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the size of the balls used to draw the atoms by <cite>delta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_aux_colormap">
<code class="descclassname">qlab.</code><code class="descname">change_aux_colormap</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_aux_colormap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_aux_colormap" title="Permalink to this definition">¶</a></dt>
<dd><p>Select the <cite>n</cite>-th auxiliary property colourmap.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_aux_property_threshold">
<code class="descclassname">qlab.</code><code class="descname">change_aux_property_threshold</code><span class="sig-paren">(</span><em>lower</em>, <em>upper</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_aux_property_threshold"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_aux_property_threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the lower and upper aux property thresholds.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_bgcolor">
<code class="descclassname">qlab.</code><code class="descname">change_bgcolor</code><span class="sig-paren">(</span><em>color</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_bgcolor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_bgcolor" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the viewer background colour to <cite>color</cite>, which should be a RGB tuple with three floats in range 0..1.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_bond_radius">
<code class="descclassname">qlab.</code><code class="descname">change_bond_radius</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_bond_radius"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_bond_radius" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the radius of the cylinders used the draw bonds by <cite>delta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_cutting_plane_wireframe_mode">
<code class="descclassname">qlab.</code><code class="descname">change_cutting_plane_wireframe_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_cutting_plane_wireframe_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_cutting_plane_wireframe_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the display mode for cutting planes</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_view_angle_amplification">
<code class="descclassname">qlab.</code><code class="descname">change_view_angle_amplification</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_view_angle_amplification"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_view_angle_amplification" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the amplification of the view angle by <cite>delta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.change_wireframe_mode">
<code class="descclassname">qlab.</code><code class="descname">change_wireframe_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#change_wireframe_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.change_wireframe_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the display mode for the unit cell box.</p>
<p>Equivalent to pressing the <cite>i</cite> key.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.clip_visible">
<code class="descclassname">qlab.</code><code class="descname">clip_visible</code><span class="sig-paren">(</span><em>orig_index=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#clip_visible"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.clip_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove atoms outside the visible window from the Atoms object. Also sets indices for frames not yet loaded from disk.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.close">
<code class="descclassname">qlab.</code><code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Close the current viewer window.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.cutting_plane">
<code class="descclassname">qlab.</code><code class="descname">cutting_plane</code><span class="sig-paren">(</span><em>n</em>, <em>d</em>, <em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#cutting_plane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.cutting_plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new cutting plane with index <cite>n</cite>, normal <cite>d</cite>, and fractional displacement <cite>s</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.delete_cutting_plane">
<code class="descclassname">qlab.</code><code class="descname">delete_cutting_plane</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#delete_cutting_plane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.delete_cutting_plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete the cutting plane with index <cite>n</cite></p>
</dd></dl>

<dl class="function">
<dt id="qlab.draw_arrows">
<code class="descclassname">qlab.</code><code class="descname">draw_arrows</code><span class="sig-paren">(</span><em>property</em>, <em>scale_factor=0.0</em>, <em>head_height=0.1</em>, <em>head_width=0.05</em>, <em>up=(0.0</em>, <em>1.0</em>, <em>0.0)</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#draw_arrows"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.draw_arrows" title="Permalink to this definition">¶</a></dt>
<dd><p>Draw arrows on each atom, based on a vector property</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>property</strong> <span class="classifier-delimiter">:</span> <span class="classifier">string</span></dt>
<dd><p class="first last">Name of the array to use for arrow vectors.
Use <code class="docutils literal notranslate"><span class="pre">None</span></code> to turn off previous arrows.</p>
</dd>
<dt><strong>scale_factor</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">Override length of arrows. 1 unit = 1 Angstrom; default
value of 0.0 means autoscale.</p>
</dd>
<dt><strong>head_height</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd><p class="first last">Specify height of arrow heads in Angstrom.</p>
</dd>
<dt><strong>head_width</strong> <span class="classifier-delimiter">:</span> <span class="classifier">float</span></dt>
<dd></dd>
<dt><strong>up</strong> <span class="classifier-delimiter">:</span> <span class="classifier">3-vector (tuple, list or array)</span></dt>
<dd><p class="first last">Specify the plane in which the arrow heads are
drawn. Arrows are drawn in the plane which is common
to their direction and this vector.
Default is <code class="docutils literal notranslate"><span class="pre">[0.,1.,0.]</span></code>.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="qlab.find_atom">
<code class="descclassname">qlab.</code><code class="descname">find_atom</code><span class="sig-paren">(</span><em>i</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#find_atom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.find_atom" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the anchor to the atom with index <cite>i</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.first">
<code class="descclassname">qlab.</code><code class="descname">first</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#first"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.first" title="Permalink to this definition">¶</a></dt>
<dd><p>Show the first frame (frame 0).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.flip_cutting_plane">
<code class="descclassname">qlab.</code><code class="descname">flip_cutting_plane</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#flip_cutting_plane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.flip_cutting_plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Flip the cutting plane with index <cite>n</cite></p>
</dd></dl>

<dl class="function">
<dt id="qlab.forward">
<code class="descclassname">qlab.</code><code class="descname">forward</code><span class="sig-paren">(</span><em>delta=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#forward"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.forward" title="Permalink to this definition">¶</a></dt>
<dd><p>Move forward by <cite>delta</cite> frames (default value is gcv().delta).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.gcat">
<code class="descclassname">qlab.</code><code class="descname">gcat</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#gcat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.gcat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current Atoms object being visualised by the current viewer</p>
</dd></dl>

<dl class="function">
<dt id="qlab.gcv">
<code class="descclassname">qlab.</code><code class="descname">gcv</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#gcv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.gcv" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current (most recently created or used) AtomEye viewer instance</p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_delta">
<code class="descclassname">qlab.</code><code class="descname">get_delta</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_delta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_delta" title="Permalink to this definition">¶</a></dt>
<dd><p>Get frame increment rate</p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_frame">
<code class="descclassname">qlab.</code><code class="descname">get_frame</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_frame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_frame" title="Permalink to this definition">¶</a></dt>
<dd><p>Get index of frame currently being viewed</p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_viewer">
<code class="descclassname">qlab.</code><code class="descname">get_viewer</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_viewer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_viewer" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the viewer identified by <cite>name</cite></p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_viewer_names">
<code class="descclassname">qlab.</code><code class="descname">get_viewer_names</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_viewer_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_viewer_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current list of viewer names</p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_viewers">
<code class="descclassname">qlab.</code><code class="descname">get_viewers</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_viewers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_viewers" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current list of viewers</p>
</dd></dl>

<dl class="function">
<dt id="qlab.get_visible">
<code class="descclassname">qlab.</code><code class="descname">get_visible</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#get_visible"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.get_visible" title="Permalink to this definition">¶</a></dt>
<dd><p>Return list of indices of atoms currently visible in the current viewer.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.highlight_qm_region">
<code class="descclassname">qlab.</code><code class="descname">highlight_qm_region</code><span class="sig-paren">(</span><em>at=None</em>, <em>run_suffix=''</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#highlight_qm_region"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.highlight_qm_region" title="Permalink to this definition">¶</a></dt>
<dd><p>Highlight QM region by replacing Si atoms with Al,
and O atoms with N, and changing colour of QM atoms to dark blue. Can be used as
a hook function to render_movie().</p>
<p>If at is None, uses Atoms associated with current viewer
(i.e., at = gcat()).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.last">
<code class="descclassname">qlab.</code><code class="descname">last</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#last"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.last" title="Permalink to this definition">¶</a></dt>
<dd><p>Show the last frame, i.e. len(gcv())-1</p>
</dd></dl>

<dl class="function">
<dt id="qlab.load_atom_color">
<code class="descclassname">qlab.</code><code class="descname">load_atom_color</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#load_atom_color"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.load_atom_color" title="Permalink to this definition">¶</a></dt>
<dd><p>Load atom colours from a .clr file.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.load_aux">
<code class="descclassname">qlab.</code><code class="descname">load_aux</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#load_aux"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.load_aux" title="Permalink to this definition">¶</a></dt>
<dd><p>Load aux property values from a .aux file.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.look_at_the_anchor">
<code class="descclassname">qlab.</code><code class="descname">look_at_the_anchor</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#look_at_the_anchor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.look_at_the_anchor" title="Permalink to this definition">¶</a></dt>
<dd><p>Equivalent to pressing the <cite>a</cite> key</p>
</dd></dl>

<dl class="function">
<dt id="qlab.normal_coloring">
<code class="descclassname">qlab.</code><code class="descname">normal_coloring</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#normal_coloring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.normal_coloring" title="Permalink to this definition">¶</a></dt>
<dd><p>Return to normal colouring of the atoms (key “o”).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.observer_goto">
<code class="descclassname">qlab.</code><code class="descname">observer_goto</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#observer_goto"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.observer_goto" title="Permalink to this definition">¶</a></dt>
<dd><p>Prompt for fractional position and move the observer there</p>
<p>Equivalent to pressing the <cite>g</cite> key.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.rcut_patch">
<code class="descclassname">qlab.</code><code class="descname">rcut_patch</code><span class="sig-paren">(</span><em>sym1</em>, <em>sym2</em>, <em>value</em>, <em>absolute=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#rcut_patch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.rcut_patch" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the cutoff distance for <cite>sym1</cite>–<cite>sym2</cite> bonds by <cite>delta</cite>.</p>
<p>e.g. to increase cutoff for Si-Si bonds by 0.5 A use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">viewer</span><span class="o">.</span><span class="n">rcut_patch</span><span class="p">(</span><span class="s1">&#39;Si&#39;</span><span class="p">,</span> <span class="s1">&#39;Si&#39;</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">)</span>
</pre></div>
</div>
<p>With <cite>absolute</cite> set to True, <cite>value</cite> is used to set the
absolute cutoff distance for <cite>sym1</cite>–<cite>sym2</cite> bonds, e.g.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">viewer</span><span class="o">.</span><span class="n">rcut_patch</span><span class="p">(</span><span class="s1">&#39;Si&#39;</span><span class="p">,</span> <span class="s1">&#39;Si&#39;</span><span class="p">,</span> <span class="mf">2.50</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="qlab.redraw">
<code class="descclassname">qlab.</code><code class="descname">redraw</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#redraw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.redraw" title="Permalink to this definition">¶</a></dt>
<dd><p>Redraw current AtomEye window, keeping Atoms and settings the same.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.render_movie">
<code class="descclassname">qlab.</code><code class="descname">render_movie</code><span class="sig-paren">(</span><em>moviefile</em>, <em>start=None</em>, <em>stop=None</em>, <em>step=None</em>, <em>hook=None</em>, <em>offset=0</em>, <em>encoder='ffmpeg -i %s -r 25 -b 30M %s'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#render_movie"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.render_movie" title="Permalink to this definition">¶</a></dt>
<dd><p>Render a movie for the trajectory.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.reset_aux_property_thresholds">
<code class="descclassname">qlab.</code><code class="descname">reset_aux_property_thresholds</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#reset_aux_property_thresholds"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.reset_aux_property_thresholds" title="Permalink to this definition">¶</a></dt>
<dd><p>Reset aux property thresholds to automatic values.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.resize">
<code class="descclassname">qlab.</code><code class="descname">resize</code><span class="sig-paren">(</span><em>width</em>, <em>height</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#resize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.resize" title="Permalink to this definition">¶</a></dt>
<dd><p>Resize the current window to <cite>width</cite> x <cite>height</cite> pixels.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.rotate">
<code class="descclassname">qlab.</code><code class="descname">rotate</code><span class="sig-paren">(</span><em>axis</em>, <em>theta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#rotate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Rotate around <cite>axis</cite> by angle <cite>theta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.run_command">
<code class="descclassname">qlab.</code><code class="descname">run_command</code><span class="sig-paren">(</span><em>command</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#run_command"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.run_command" title="Permalink to this definition">¶</a></dt>
<dd><p>Run a command in current AtomEye thread.</p>
<p>The command is queued for later execution, unless <code class="xref py py-attr docutils literal notranslate"><span class="pre">block</span></code> is True.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><dl class="first last docutils">
<dt><strong>command</strong> <span class="classifier-delimiter">:</span> <span class="classifier">string</span></dt>
<dd><p class="first last">The command to pass to AtomEye</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="qlab.run_script">
<code class="descclassname">qlab.</code><code class="descname">run_script</code><span class="sig-paren">(</span><em>script</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#run_script"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.run_script" title="Permalink to this definition">¶</a></dt>
<dd><p>Run commands from the file script, in a blocking fashion.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.save_script">
<code class="descclassname">qlab.</code><code class="descname">save_script</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#save_script"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.save_script" title="Permalink to this definition">¶</a></dt>
<dd><p>Save AtomEye viewer settings to a file.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.scv">
<code class="descclassname">qlab.</code><code class="descname">scv</code><span class="sig-paren">(</span><em>viewer</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#scv"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.scv" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the current AtomEye viewer to <cite>viewer</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.select_atoms">
<code class="descclassname">qlab.</code><code class="descname">select_atoms</code><span class="sig-paren">(</span><em>reset=True</em>, <em>markname='selection_mark'</em>, <em>value=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#select_atoms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.select_atoms" title="Permalink to this definition">¶</a></dt>
<dd><p>Select atoms by clicking on them. Returns a list of atom indices.</p>
<p>Specify reset=False to modify an existing property. The name of the
property is <cite>markname</cite> (default “selection_mark”) and the value of
clicked atoms is given by the <cite>value</cite> argument (default True).</p>
<p>See also <a class="reference internal" href="#qlab-select-atoms"><span class="std std-ref">Selecting Atoms</span></a></p>
</dd></dl>

<dl class="function">
<dt id="qlab.select_gear">
<code class="descclassname">qlab.</code><code class="descname">select_gear</code><span class="sig-paren">(</span><em>gear</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#select_gear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.select_gear" title="Permalink to this definition">¶</a></dt>
<dd><p>Change the AtomEye gear to <cite>gear</cite></p>
<p>Equivalent to pressing the one of the numeric keys 0..9</p>
</dd></dl>

<dl class="function">
<dt id="qlab.set_cutoffs">
<code class="descclassname">qlab.</code><code class="descname">set_cutoffs</code><span class="sig-paren">(</span><em>nneighb_only=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#set_cutoffs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.set_cutoffs" title="Permalink to this definition">¶</a></dt>
<dd><p>Set cutoffs for AtomEye bonds and coordination colouring</p>
<p>Cutoff lengths are set to match quippy <code class="xref py py-attr docutils literal notranslate"><span class="pre">nneightol</span></code>
(if <cite>nneighb_only</cite> is True, the default) or <code class="xref py py-attr docutils literal notranslate"><span class="pre">cutoff</span></code>
(otherwise).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.set_delta">
<code class="descclassname">qlab.</code><code class="descname">set_delta</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#set_delta"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.set_delta" title="Permalink to this definition">¶</a></dt>
<dd><p>Set frame increment rate</p>
</dd></dl>

<dl class="function">
<dt id="qlab.set_frame">
<code class="descclassname">qlab.</code><code class="descname">set_frame</code><span class="sig-paren">(</span><em>frame</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#set_frame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.set_frame" title="Permalink to this definition">¶</a></dt>
<dd><p>Set current frame index to <cite>frame</cite></p>
</dd></dl>

<dl class="function">
<dt id="qlab.setp">
<code class="descclassname">qlab.</code><code class="descname">setp</code><span class="sig-paren">(</span><em>self</em>, <em>key</em>, <em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#setp"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.setp" title="Permalink to this definition">¶</a></dt>
<dd><p>Run the AtomEye command “set key value”</p>
</dd></dl>

<dl class="function">
<dt id="qlab.shift_cutting_plane">
<code class="descclassname">qlab.</code><code class="descname">shift_cutting_plane</code><span class="sig-paren">(</span><em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#shift_cutting_plane"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.shift_cutting_plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Shift the current cutting plane by an amount <cite>delta</cite>.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.shift_cutting_plane_to_anchor">
<code class="descclassname">qlab.</code><code class="descname">shift_cutting_plane_to_anchor</code><span class="sig-paren">(</span><em>n</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#shift_cutting_plane_to_anchor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.shift_cutting_plane_to_anchor" title="Permalink to this definition">¶</a></dt>
<dd><p>Move the cutting plane with index <cite>n</cite> to the anchor</p>
</dd></dl>

<dl class="function">
<dt id="qlab.shift_xtal">
<code class="descclassname">qlab.</code><code class="descname">shift_xtal</code><span class="sig-paren">(</span><em>axis</em>, <em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#shift_xtal"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.shift_xtal" title="Permalink to this definition">¶</a></dt>
<dd><p>Shift crystal within periodic boundaries along <cite>axis</cite> by <cite>delta</cite> (key “Shift+left/right/up/down”).</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_aux_property_thresholds_rigid">
<code class="descclassname">qlab.</code><code class="descname">toggle_aux_property_thresholds_rigid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_aux_property_thresholds_rigid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_aux_property_thresholds_rigid" title="Permalink to this definition">¶</a></dt>
<dd><p>Toggle between floating and rigid aux property thresholds when moving between frames</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_aux_property_thresholds_saturation">
<code class="descclassname">qlab.</code><code class="descname">toggle_aux_property_thresholds_saturation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_aux_property_thresholds_saturation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_aux_property_thresholds_saturation" title="Permalink to this definition">¶</a></dt>
<dd><p>Toggle between saturated colouring and invisibility for values outside aux prop thresholds.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_bond_mode">
<code class="descclassname">qlab.</code><code class="descname">toggle_bond_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_bond_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_bond_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Turn on or off bonds.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_coordination_coloring">
<code class="descclassname">qlab.</code><code class="descname">toggle_coordination_coloring</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_coordination_coloring"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_coordination_coloring" title="Permalink to this definition">¶</a></dt>
<dd><p>Turn on or off colouring by coordination number (key “k”)</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_parallel_projection">
<code class="descclassname">qlab.</code><code class="descname">toggle_parallel_projection</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_parallel_projection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_parallel_projection" title="Permalink to this definition">¶</a></dt>
<dd><p>Toggle between parallel and perspective projections.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.toggle_small_cell_mode">
<code class="descclassname">qlab.</code><code class="descname">toggle_small_cell_mode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#toggle_small_cell_mode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.toggle_small_cell_mode" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Toggle between two different behaviours for when cell is smaller than r_cut/2:</dt>
<dd><ol class="first last arabic simple">
<li>clip cell - some neigbours may be lost (default)</li>
<li>replicate cell along narrow directions</li>
</ol>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="qlab.translate">
<code class="descclassname">qlab.</code><code class="descname">translate</code><span class="sig-paren">(</span><em>axis</em>, <em>delta</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#translate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.translate" title="Permalink to this definition">¶</a></dt>
<dd><p>Translate system along <cite>axis</cite> by an amount <cite>delta</cite> (key “Ctrl+left/right/up/down”)</p>
</dd></dl>

<dl class="function">
<dt id="qlab.view">
<code class="descclassname">qlab.</code><code class="descname">view</code><span class="sig-paren">(</span><em>source</em>, <em>name=None</em>, <em>recycle=True</em>, <em>loadall=False</em>, <em>inject=True</em>, <em>rename=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#view"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.view" title="Permalink to this definition">¶</a></dt>
<dd><p>Read atoms from <cite>source</cite> and open in an AtomEye viewer window.</p>
<p>If not present, <cite>name</cite> is derived from the filename of <cite>source</cite>.</p>
<p>If recycle is true (default), try to reuse an exising viewer window
with the same name. Otherwise the name is made unique if necesary
by appending a number.</p>
<p>If loadall is false (default) we use an AtomsReader to load the
frames from the trajectory lazily (i.e., as required). Otherwise
the entire file is read into an AtomsList.</p>
<p>If inject is true (default), a new variable called <cite>name</cite> is injected
into the parent stack frame.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.wait">
<code class="descclassname">qlab.</code><code class="descname">wait</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#wait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.wait" title="Permalink to this definition">¶</a></dt>
<dd><p>Sleep until current AtomEye viewer has finished processing all queued events.</p>
</dd></dl>

<dl class="function">
<dt id="qlab.xtal_origin_goto">
<code class="descclassname">qlab.</code><code class="descname">xtal_origin_goto</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/qlab.html#xtal_origin_goto"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#qlab.xtal_origin_goto" title="Permalink to this definition">¶</a></dt>
<dd><p>Move the crystal origin to fractional coordinates <cite>s</cite></p>
<p>For example, use <code class="docutils literal notranslate"><span class="pre">s=[0.5,</span> <span class="pre">0.5,</span> <span class="pre">0.5]</span></code> to shift by half the cell along
the <span class="math notranslate nohighlight">\(\mathbf{a}\)</span>, <span class="math notranslate nohighlight">\(\mathbf{b}\)</span> and <span class="math notranslate nohighlight">\(\mathbf{c}\)</span>
lattice vectors.</p>
</dd></dl>

</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
      
        <a href="visualisation.html" class="btn btn-neutral float-left" title="Visualisation Tools" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2008-2016, James Kermode

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>